<template>
	<view class="title">
		<view class="left">
			<text class="t-solid" :style="{backgroundColor: bgColor}"></text>
			<text class="t-title">{{title}}</text>
		</view>
		<view class="right" v-if="toast" @click="goPage()">
			<text class="t-toast">{{toast}}</text>
			<text class="iconfont icon-dayu"></text>
		</view>
	</view>
</template>

<script>
	export default{
		name:"BlockTitle",
		props:{
			title:{
				type:String,
				default:""
			},
			toast:{
				type:String,
				default:""
			},
			bgColor:{
				type:String,
				default:"#000000"
			},
			goUrl:{
				type:String,
				default:""
			},
		},
		methods:{
			goPage(){
				wx.navigateTo({
					url:this.goUrl
				})
			}
		}
	}
</script>

<style scoped lang="less" src="./BlockTitle.less">
</style>
